package com.xmg.shop.controller;

import com.xmg.shop.domain.Product;
import com.xmg.shop.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Administrator on 2017/8/11.
 */
@Controller
public class ProductController {
    @Autowired
    private IProductService productService;

    @RequestMapping("product")
    @ResponseBody
    public Product getProduct(){
         return productService.getProduct(1L);
    }
}
